#include <stdio.h>
#include "common.h"

#define BUFFERSIZE 20

int main(int argc, char **argv)
{
	int ret = -1;
	int data[2] = {0};

	// no warnings
	argc = argc;
	argv = argv;

	ret = GenerateRandomData(data, sizeof(data) / sizeof(data[0]), 255);
	if (ret != 0)
	{
		printf("GenerateRandomData error %d\n", ret);
		return ret;
	}

	printf("random data:\n");
	for (unsigned int i = 0; i < sizeof(data) / sizeof(data[0]); i++)
	{
		printf("%d ", data[i]);
	}
	printf("\n");

	ret = ReverseOrder(data, sizeof(data) / sizeof(data[0]));
	if (ret != 0)
	{
		printf("ReverseOrder error %d\n", ret);
		return ret;
	}

	printf("reverse order data:\n");
	for (unsigned int i = 0; i < sizeof(data) / sizeof(data[0]); i++)
	{
		printf("%d ", data[i]);
	}
	printf("\n");
	return 0;
}
